<template>
    <div>
        <Timeline v-if="dataList.length > 0" class="ivu-pt-16 main-height">
            <TimelineItem v-for="item in dataList" :key="item.id">
                <p class="time">{{ item.created_at_str }}</p>
                <p class="content contentList">{{ item.action_content }}</p>
                <p class="consultant">
                    <span class="c-inr-right" v-if="item.profession_name">{{item.profession_name}}</span>
                    <span class="c-inr-right" v-if="item.operate_name">{{item.operate_name}}</span>
                    <Badge status="processing" :text="item.action_type_str" />
                    <span> &nbsp; </span>
                    <Badge status="success" v-show="item.action_type === '10' &&  item.callback_way_str != '' ? true : false" color="orange" :text="item.callback_way_str" />
                </p>
            </TimelineItem>
        </Timeline>
        <div v-else class="ivu-pt-16" style="min-height: 200px;text-align: center">暂无用户足迹</div>
    </div>
</template>
<script>
    import { PatientInfoFoot } from '@/api/patient'
    export default {
        name: 'Foot',
        data () {
            return {
                page: {
                    page: 0,
                    pageSize: 0,
                    total: 0
                },
                dataList: []
            }
        },
        methods: {
            getData (id) {
                PatientInfoFoot({
                    patient_user_id: id,
                    page: this.page.page,
                    pageSize: this.page.pageSize
                }).then(res => {
                    this.page.total = res.total
                    this.dataList = res.list
                })
            }
        }
    }
</script>

<style scoped>
.c-inr-right{
    margin-right: 10px;
}
    .main-height {
        height: 460px;
        max-height: 460px;
        overflow-y: auto;
    }
  .contentList {
    margin: 10px 0;
  }
</style>
